Checked.get

Returns a copy of the underlying value.

struct Checked(T, Hook = Abort)
get
inout
(
)
if (
isIntegral!T ||
is(T == Checked!(U, H),
U
H
)
)

Examples

1 auto x = checked(ubyte(42));
2 static assert(is(typeof(x.get()) == ubyte));
3 assert(x.get == 42);
4 const y = checked(ubyte(42));
5 static assert(is(typeof(y.get()) == const ubyte));
6 assert(y.get == 42);

Meta